Previous Book Contents Book Index Next

Inside Macintosh: Open Transport /
Chapter 8 - TCP/IP Services / TCP/IP Services Reference
Functions / Address Utilities


OTInitDNSAddress

Fills in a DNSAddress structure with the data you provide.

C INTERFACE
size_t OTInitDNSAddress (DNSAddress *addr,
                         char *str);
C++ INTERFACE
None. C++ clients use the C interface to this function.

PARAMETERS
addr
A pointer to a DNSAddress structure that you allocate. The function fills in this structure.
str
A pointer to a domain name string. This string can be just a host name (otteam), a partially qualified domain name (for example, "otteam.ssw"), a fully qualified domain name (for example, "otteam.ssw.apple.com."), or an internet address in dotted-
decimal format (for example, "17.202.99.99"), and can optionally include the port number (for example, "otteam.ssw.apple.com:25" or "17.202.99.99:25").
DESCRIPTION
This function fills in the fAddressType field of the DNSAddress structure with the value AF_DNS, fills in the fName field with the address string you specify, and returns the size of the resulting DNSAddress structure as an unsigned integer. You can use the DNSAddress structure to provide an address when you use a UDP or TCP endpoint. If you do so, the domain name resolver resolves the address for you automatically.

SEE ALSO
The DNSAddress structure is described in "DNS Address Structure" on page 8-23.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 AUG 1996